package com.study.spmongodb.wwj.thread.char02;

/**
 * @author MI
 * @version 1.0
 * @date 2020/12/5 21:50
 */
public class TickWindow extends Thread {
    private static final int MAX = 50;
    private static int index = 1;

    private final String name;

    public TickWindow(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        while (index <= MAX) {
            System.out.println(name + "当前的号码是 " + index++);
        }
    }
}
